/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nms.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author mohamedemara
 */
@Embeddable
public class ISPTelePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "isp_id")
    private String ispId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 15)
    @Column(name = "tele")
    private String tele;

    public ISPTelePK() {
    }

    public ISPTelePK(String ispId, String tele) {
        this.ispId = ispId;
        this.tele = tele;
    }

    public String getIspId() {
        return ispId;
    }

    public void setIspId(String ispId) {
        this.ispId = ispId;
    }

    public String getTele() {
        return tele;
    }

    public void setTele(String tele) {
        this.tele = tele;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ispId != null ? ispId.hashCode() : 0);
        hash += (tele != null ? tele.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ISPTelePK)) {
            return false;
        }
        ISPTelePK other = (ISPTelePK) object;
        if ((this.ispId == null && other.ispId != null) || (this.ispId != null && !this.ispId.equals(other.ispId))) {
            return false;
        }
        if ((this.tele == null && other.tele != null) || (this.tele != null && !this.tele.equals(other.tele))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.nms.entities.ISPTelePK[ ispId=" + ispId + ", tele=" + tele + " ]";
    }
    
}
